package com.tanhua.dubbo.api.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.domain.db.Character;
import com.tanhua.domain.db.Questionnaire;
import com.tanhua.dubbo.api.CharacterApi;
import com.tanhua.dubbo.api.QuestionnaireApi;
import com.tanhua.dubbo.mapper.QuestionnaireMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(timeout = 1000000000)
public class QuestionnaireApiImpl implements QuestionnaireApi {

    @Autowired
    private QuestionnaireMapper questionnaireMapper;

    @Override
    public List<Questionnaire> findAll() {
        QueryWrapper<Questionnaire> wrapper = new QueryWrapper<>();
        return questionnaireMapper.selectList(wrapper);
    }

}
